import request from '@/utils/request'

// 查询床位信息列表
export function listBunk(query) {
  return request({
    url: '/hospital/bunk/list',
    method: 'get',
    params: query
  })
}

// 查询有效床位
export function listAllEffectBunk(query) {
  return request({
    url: '/hospital/bunk/listEffectAll',
    method: 'get',
    params: query
  })
}

// 查询所有床位
export function listAllBunk(query) {
  return request({
    url: '/hospital/bunk/listAll',
    method: 'get',
    params: query
  })
}

// 查询床位信息详细
export function getBunk(bunkId) {
  return request({
    url: '/hospital/bunk/' + bunkId,
    method: 'get'
  })
}

// 新增床位信息
export function addBunk(data) {
  return request({
    url: '/hospital/bunk',
    method: 'post',
    data: data
  })
}

// 修改床位信息
export function updateBunk(data) {
  return request({
    url: '/hospital/bunk',
    method: 'put',
    data: data
  })
}

// 删除床位信息
export function delBunk(bunkId) {
  return request({
    url: '/hospital/bunk/' + bunkId,
    method: 'delete'
  })
}
